import { exInputNumber, exSwitch, exSelect } from '@ve/common/components/extension'

export default {
  VERSION: '20220408',
  type: 'uiTimeCard',
  name: '时间盒子',
  icon: 'time-line',
  //数据别名
  // dataName: 'uiFlexbox_data',
  //扩展
  extension: {
    boxHeight: exInputNumber('高度', 50, 1, 500),
    flexDer: exSelect('子组件排布方向', 'row', [
      {
        label: '横',
        value: 'row',
      },
      {
        label: '竖',
        value: 'col',
      },
    ]),
    padding: {
      type: 'exInputNumber',
      name: '内边距',
      value: 1,
      min: 0,
      max: 12,
    },
    justifyAlign: {
      type: 'exRadioGroup',
      name: '水平位置',
      value: 'center',
      list: [
        {
          label: '居左',
          value: 'start',
        },
        {
          label: '居中',
          value: 'center',
        },
        {
          label: '居右',
          value: 'end',
        },
      ],
    },
    itemsAlign: {
      type: 'exRadioGroup',
      name: '垂直方向',
      value: 'center',
      list: [
        {
          label: '居上',
          value: 'flex-start',
        },
        {
          label: '居中',
          value: 'center',
        },
        {
          label: '居下',
          value: 'flex-end',
        },
      ],
    },
    topMargin: {
      type: 'exInputNumber',
      name: '上外边距',
      value: 0,
    },
    rightMargin: {
      type: 'exInputNumber',
      name: '右外边距',
      value: 0,
    },
    bottomMargin: {
      type: 'exInputNumber',
      name: '下外边距',
      value: 0,
    },
    leftMargin: {
      type: 'exInputNumber',
      name: '左外边距',
      value: 0,
    },
    showBrage: exSwitch('显示角标', true),
    brageWidth: exInputNumber('角标线宽', 15, 1, 500),
    brageLine: exInputNumber('角标线长', 15, 1, 500),
    brageRotate: exInputNumber('角标圆角', 0, 0, 500),
    brageColorLeftTop: {
      type: 'exSetChartColor',
      name: '角标颜色-左上',
      value: '#9271D5',
    },
    brageColorLeftBottom: {
      type: 'exSetChartColor',
      name: '角标颜色-左下',
      value: '#9271D5',
    },
    brageColorRightBottom: {
      type: 'exSetChartColor',
      name: '角标颜色-右下',
      value: '#9271D5',
    },
    brageColorRightTop: {
      type: 'exSetChartColor',
      name: '角标颜色-右上',
      value: '#9271D5',
    },
    backgroundColor: {
      type: 'exSetChartColor',
      name: '背景颜色',
      value: '#fff',
    },
    titleBgColor: {
      type: 'exSetChartColor',
      name: '主题背景',
      value: '#D7CBEE',
    },
    titleRadius: {
      type: 'exInputNumber',
      name: '主题圆角',
      value: 0,
    },
    titleTopMargin: {
      type: 'exInputNumber',
      name: '主题上外边距',
      value: 0,
    },
    titleRightMargin: {
      type: 'exInputNumber',
      name: '主题右外边距',
      value: 0,
    },
    titleBottomMargin: {
      type: 'exInputNumber',
      name: '主题下外边距',
      value: 0,
    },
    titleLeftMargin: {
      type: 'exInputNumber',
      name: '主题左外边距',
      value: 0,
    },
    titleTopPadding: {
      type: 'exInputNumber',
      name: '主题上内边距',
      value: 5,
    },
    titleRightPadding: {
      type: 'exInputNumber',
      name: '主题右内边距',
      value: 0,
    },
    titleBottomPadding: {
      type: 'exInputNumber',
      name: '主题下内边距',
      value: 5,
    },
    titleLeftPadding: {
      type: 'exInputNumber',
      name: '主题左内边距',
      value: 7,
    },
    titleFontSize: {
      type: 'exInputNumber',
      name: '主题字体大小',
      value: 12,
    },
    titleColor: {
      type: 'exSetChartColor',
      name: '主题字体颜色',
      value: '#fff',
    },
    titleFontWeight: exSelect('字体粗细', 500, [
      {
        label: '正常',
        value: 500,
      },
      {
        label: '加粗',
        value: 600,
      },
      {
        label: '特粗',
        value: 700,
      },
    ]),
    dateCenter: exSelect('分割', '-', [
      {
        label: '年月日',
        value: 'date',
      },
      {
        label: '-符号',
        value: '-',
      },
    ]),
    haveWeek: exSwitch('是否显示星期几', true),
    backgroundImg: {
      type: 'exUpload',
      name: '背景图片',
      value: '',
    },
  },
  list: [],
}
